package com.example.business_oa.controller;

import com.example.business_oa.service.HymianshiService;
import com.example.comment_oa.pojos.Interview;
import com.example.comment_oa.response.AjaxResponse;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@CrossOrigin
@RequestMapping("/businessOa")
public class HyInterviewController {
    @Resource
    HymianshiService hymianshiSrevice;

    //关注页新增面试
    @PostMapping("interview/addInter")
    public AjaxResponse addInter(@RequestBody Interview interview){
        System.err.println("hhhhhhhhhhhhhhhhhhh"+interview.getInterDates());
        int i = hymianshiSrevice.addInter(interview);
        return AjaxResponse.success(i);
    }
    //新增二次面试安排
    @PostMapping("interview/addInters")
    public AjaxResponse addInters(@RequestBody Interview interview){
        System.err.println("进来了吗？");
        System.err.println(interview);
        int xiugai = hymianshiSrevice.addInters(interview);
        return AjaxResponse.success(xiugai);
    }
    //批量新增面试安排
    @PostMapping("interview/ddd")
    public AjaxResponse ddd(@RequestBody Interview interview){
        System.err.println("进来了吗1111111111111");
        System.err.println(interview);
        int i = hymianshiSrevice.addsmianshi(interview);
        return AjaxResponse.success(i);
    }
}
